<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
<html><head>
<title>font</title>
</head><body>
<p>[<a href="mxdoc.htm">mainpage</a>]
[<a href="tags.htm">tags</a>]<br>
<h1><a name="font">module: font</a></h1><p><b>Font functions</b><p>
This module contains functions related to font drawing .  
(<a href="../include/degfx/font.h">../include/degfx/font.h</a>)
<p>
!Builtin 8x8 font  
(<a href="../include/degfx/font.h">../include/degfx/font.h</a>)
<p>
!Builtin 8x14 font  
(<a href="../include/degfx/font.h">../include/degfx/font.h</a>)
<p>
!Builtin 8x16 font  
(<a href="../include/degfx/font.h">../include/degfx/font.h</a>)<p>Part of the <a href="degfx.htm">degfx</a> library.<ul><li>
<a name="MX_FONT"><code>MX_FONT</code></a>
<p>
<p><b>A font  </b><p>
(<a href="../include/degfx/font.h">../include/degfx/font.h</a>)<p></li>
<li>
<a name="void mx_font_default(MX_FONT* font)"><code>void mx_font_default(MX_FONT* font)</code></a>
<p>
<p><b>Set the default font  </b><p>
(<a href="../include/degfx/font.h">../include/degfx/font.h</a>)<p></li>
<li>
<a name="void mx_font_bitmap_draw(const MX_FONT* font, struct MX_BITMAP* bitmap, const char* text, int len, int x, const int y, const MX_PIXEL fore)"><code>void mx_font_bitmap_draw(const MX_FONT* font, struct MX_BITMAP* bitmap, const char* text, int len, int x, const int y, const MX_PIXEL fore)</code></a>
<p>
<p><b>Draw text onto a bitmap  </b><p>
(<a href="../include/degfx/font.h">../include/degfx/font.h</a>)<p></li>
<li>
<a name="void mx_font_bitmap_drawblock(const MX_FONT* font, struct MX_BITMAP* bitmap, const char* text, int len, int x, int y, const MX_PIXEL fore)"><code>void mx_font_bitmap_drawblock(const MX_FONT* font, struct MX_BITMAP* bitmap, const char* text, int len, int x, int y, const MX_PIXEL fore)</code></a>
<p>
<p><b>Draw a block of text onto a bitmap  </b><p>
(<a href="../include/degfx/font.h">../include/degfx/font.h</a>)<p></li>
<li>
<a name="define mx_font_draw(f,t,l,x,y,fore)"><code>#define mx_font_draw(f,t,l,x,y,fore)</code></a>
<p>
<p><b>Draw text onto the screen  </b><p>
(<a href="../include/degfx/font.h">../include/degfx/font.h</a>)<p></li>
<li>
<a name="define mx_font_drawblock(f,t,l,x,y,fore)"><code>#define mx_font_drawblock(f,t,l,x,y,fore)</code></a>
<p>
<p><b>Draw a block of text onto the screen  </b><p>
(<a href="../include/degfx/font.h">../include/degfx/font.h</a>)<p></li>
<li>
<a name="unsigned int mx_font_height(const MX_FONT* font)"><code>unsigned int mx_font_height(const MX_FONT* font)</code></a>
<p>
<p><b>Return the height of a font  </b><p>
(<a href="../include/degfx/font.h">../include/degfx/font.h</a>)<br>
!The height in pixels of a font
This function return the height of a font in pixels.  
(<a href="../include/degfx/font/fontsize.c">../include/degfx/font/fontsize.c</a>)

<p>If the font argument is 0 then the default font be used.  
(<a href="../include/degfx/font/fontsize.c">../include/degfx/font/fontsize.c</a>)<p></li>
<li>
<a name="unsigned int mx_font_width(const MX_FONT* font, const char* text, int len)"><code>unsigned int mx_font_width(const MX_FONT* font, const char* text, int len)</code></a>
<p>
<p><b>Return the width of a portion of text  </b><p>
(<a href="../include/degfx/font.h">../include/degfx/font.h</a>)<p></li>
<li>
<a name="void mx_font_blocksize(const MX_FONT* font, const char* text, int len, int* tw, int* th, int* last)"><code>void mx_font_blocksize(const MX_FONT* font, const char* text, int len, int* tw, int* th, int* last)</code></a>
<p>
<p><b>Return the size of a block for a portion of text  </b><p>
(<a href="../include/degfx/font.h">../include/degfx/font.h</a>)<br>
The size in pixels of multi-line text
This function determines the area in pixels required to draw text on
a bitamp using mx_font_bitmap_drawblock().  
(<a href="../include/degfx/font/block.c">../include/degfx/font/block.c</a>)

<p>If the font argument is 0 then the default font be used.  
(<a href="../include/degfx/font/block.c">../include/degfx/font/block.c</a>)<p></li>
<li>
<a name="void mx_font_bitmap_drawblock(const MX_FONT* font, MX_BITMAP* bitmap, const char* text, int len, int x, int y, const MX_PIXEL fore)"><code>void mx_font_bitmap_drawblock(const MX_FONT* font, MX_BITMAP* bitmap, const char* text, int len, int x, int y, const MX_PIXEL fore)</code></a>
<p>
<p><b>Draw multi-line text onto a bitmap</b><p>
This function draws text on a bitamp.  Newline characters (\r or \r\n)
cause the following text to be placed on the following line.  
(<a href="../include/degfx/font/block.c">../include/degfx/font/block.c</a>)

<p>If the font argument is 0 then the default font be used.  
(<a href="../include/degfx/font/block.c">../include/degfx/font/block.c</a>)

<p>The function mx_font_bitmap_draw() function is used internally
                to draw the individual text lines.  
(<a href="../include/degfx/font/block.c">../include/degfx/font/block.c</a>)<p></li>
<li>
<a name="void mx_font_bitmap_draw(const MX_FONT* font, MX_BITMAP* bitmap, const char* text, int len, int x, const int y, const MX_PIXEL fore)"><code>void mx_font_bitmap_draw(const MX_FONT* font, MX_BITMAP* bitmap, const char* text, int len, int x, const int y, const MX_PIXEL fore)</code></a>
<p>
<p><b>Draw text onto a bitmap</b><p>
This function draws text on a bitmap at a specific position using a specified
font and color.  Only the foreground color is drawn, the pixels 'behind' the 
text are not drawn.  
(<a href="../include/degfx/font/fontdraw.c">../include/degfx/font/fontdraw.c</a>)

<p>If the font argument is 0 then the default font is used.  
(<a href="../include/degfx/font/fontdraw.c">../include/degfx/font/fontdraw.c</a>)

<p>If the length argument is less than zero then the string is assumed to be
	    zero terminated  
(<a href="../include/degfx/font/fontdraw.c">../include/degfx/font/fontdraw.c</a>)

<p>The text drawing is made efficient by skipping text, or portions of
            text that will be clipped.  
(<a href="../include/degfx/font/fontdraw.c">../include/degfx/font/fontdraw.c</a>)<p></li>
<li>
<a name="unsigned int mx_font_width(const MX_FONT* font, const char* text, int num)"><code>unsigned int mx_font_width(const MX_FONT* font, const char* text, int num)</code></a>
<p>
<p><b>The width in pixels of some text</b><p>
This function return the width of a portion of text in pixels.  
(<a href="../include/degfx/font/fontsize.c">../include/degfx/font/fontsize.c</a>)

<p>If the font argument is 0 then the default font be used.  
(<a href="../include/degfx/font/fontsize.c">../include/degfx/font/fontsize.c</a>)

<p>If the length of characters is less than 0 then the text is assumed
        to be zero terminated.  
(<a href="../include/degfx/font/fontsize.c">../include/degfx/font/fontsize.c</a>)<p></li>
<li>
<a name="MX_FONT* mx_font_bitmap(const MX_BITMAP* bitmap, int start)"><code>MX_FONT* mx_font_bitmap(const MX_BITMAP* bitmap, int start)</code></a>
<p>
<p><b>Load a font from a bitmap.  </b><p>
(<a href="../include/degfx/font/loadfont.c">../include/degfx/font/loadfont.c</a>)<p></li>
<li>
<a name="MX_FONT* mx_font_pcx(const char* filename, int start)"><code>MX_FONT* mx_font_pcx(const char* filename, int start)</code></a>
<p>
<p><b>Load a font from a PCX file.  </b><p>
(<a href="../include/degfx/font/loadfont.c">../include/degfx/font/loadfont.c</a>)<p></li>
</ul><p>Generated by <a href="http://www.deleveld.dds.nl/mxdoc/index.htm">MXDOC</a> 2.2 on Sun Feb  4 15:16:26 2007


</body></html>
